/**
 * Copyright (c) 2009 BBM AG
 * Melsungen, Germany
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of 
 * BBM AG ("Confidential Information").  You shall not disclose such 
 * Confidential Information and shall use it only in accordance with 
 * the terms of the license agreement you entered into with BBM AG.
 * 
 * Created on: 08.04.2009
 * Last modified: $Date$
 * 
 * $HeadURL$
 * $Revision$
 */
package de.riceman.simpleGo.players;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import de.riceman.simpleGo.main.BitMatrix;
import de.riceman.simpleGo.main.Configuration;
import de.riceman.simpleGo.main.GoGame;


/**
 * @author reismade
 *
 * @version $Revision$
 */
public class HumanGUI extends Player {

	private BitMatrix move;

	/**
	 * @param move the move to set
	 */
	public void setMove(BitMatrix move) {
		this.move = move;
	}

	/**
	 * @param name
	 * @param player
	 */
	public HumanGUI(String name, boolean player, Configuration configuration) {

		super(name, player, configuration);
	}

	/**
	 * @see player.Player#generateMove()
	 */
	@Override
	public void generateMove() {
		
/*		BufferedReader bin = new BufferedReader(new InputStreamReader(System.in));
		String input = null;
		int size;
		int position = -1;
		
		size = configuration.getSize() * configuration.getSize();
		
		BitMatrix move = new BitMatrix(1, size);
		
		while (position == -1) {
		
			System.out.print("\n> ");
			try {
				input = bin.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			
			if(input.equals("pass")) {
				return move;
			} else {
				try {
					position = Integer.valueOf(input);
					
					if (position >= 0 && position < size) {
						
						move.set(position);
						return move;
					} else {
						throw new IllegalArgumentException("no such position!");
					}
					
				} catch (NumberFormatException e) {
					System.out.println("not a number!");
				}
				
			}
		}
*/
	}

}
